package com.luobo.found.factory.method;

import com.luobo.found.factory.simple.Color;

/**
 * 2. 工厂方法模式(Factory Method)
 * 和简单工厂模式中工厂负责生产所有产品相比，工厂方法模式将生成具体产品的任务分发给具体的产品工厂
 * @author : AnWen
 * @version :1.0
 * @email : anwen375@qq.com
 * @since : 2020/3/4 18:46
 */
public interface ColorAbstractFactory {
    Color makeColor();

    //演示
    public static void main(String[] args) {
        ColorAbstractFactory buleFactory = new BuleFactory();
        ColorAbstractFactory redFactory = new RedFactory();
        ColorAbstractFactory yellowFactory = new YellowFactory();

        Color color = buleFactory.makeColor();
        redFactory.makeColor();
        yellowFactory.makeColor();

    }

}
